import request from '@/utils/request'

// 拉取组织树
export function fetchList(params) {
  return request({
    url:'/department/list',
    method:'get',
    params:params
  })
}

// 添加节点
export function add(data) {
  return request({
    url: '/department/save',
    method: 'post',
    data: data
  })
}

// 更新节点
export function update(data) {
  return request({
    url: '/department/update',
    method: 'post',
    data: data
  })
}

// 删除节点
export function del(id) {
  return request({
    url:'/department/delete/' + id,
    method:'delete'
  })
}